﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace WebMVC.Areas.AdminPanel.Models
{
    public class TaxiServiceListViewModel
    {
        public int Id { get; set; }
        public string NameEN { get; set; }
        
        public string PrimaryPhoneNumber { get; set; }

        public short PricePerKM { get; set; }
        public short MinPrice { get; set; }
        public short? UpTo6KMPrice { get; set; }
        public decimal? MinPriceKM { get; set; }

        public bool NoSmoking { get; set; }
        public bool Conditioning { get; set; }
        public bool HasMeter { get; set; }

        public DateTime CreateDate { get; set; }
        public string Status { get; set; }
    }

    public class TaxiServiceCreateViewModel
    {
        [Required]
        [DisplayName("Name EN")]
        [StringLength(50)]
        public string NameEN { get; set; }

        [Required]
        [DisplayName("Name RU")]
        [StringLength(50)]
        public string NameRU { get; set; }

        [Required]
        [DisplayName("Name AM")]
        [StringLength(50)]
        public string NameAM { get; set; }


        
        [DisplayName("Description EN")]
        [StringLength(500)]
        public string DescriptionEN { get; set; }

        
        [DisplayName("Description RU")]
        [StringLength(500)]
        public string DescriptionRU { get; set; }

        
        [DisplayName("Description AM")]
        [StringLength(500)]
        public string DescriptionAM { get; set; }
        
        [Required]
        [DisplayName("Primary Phone Number")]
        [DataType(DataType.PhoneNumber)]
        [StringLength(20)]
        public string PrimaryPhoneNumber { get; set; }

        [DisplayName("Phone Number 1")]
        [DataType(DataType.PhoneNumber)]
        [StringLength(20)]
        public string PhoneNumber1 { get; set; }

        [DisplayName("Phone Number 2")]
        [DataType(DataType.PhoneNumber)]
        [StringLength(20)]
        public string PhoneNumber2 { get; set; }

        [DisplayName("Phone Number 3")]
        [DataType(DataType.PhoneNumber)]
        [StringLength(20)]
        public string PhoneNumber3 { get; set; }

        [DisplayName("Phone Number 4")]
        [DataType(DataType.PhoneNumber)]
        [StringLength(20)]
        public string PhoneNumber4 { get; set; }

        [Required]
        [DisplayName("Price per KM")]
        [Range(10,10000)]
        public short? PricePerKM { get; set; }

        [Required]
        [DisplayName("Min Price")]
        [Range(10, 10000)]
        public short? MinPrice { get; set; }

        [DisplayName("Min Price KM")]
        [Range(1, 10000)]
        public decimal? MinPriceKM { get; set; }

        [DisplayName("Free wait minutes")]
        [Range(0, 10000)]
        public short? FreeWaitMinutes { get; set; }

        [DisplayName("Wait minute price")]
        [Range(0, 10000)]
        public short? WaitMinutePrice { get; set; }

        [DisplayName("1-6KM Price")]
        [Range(10, 10000)]
        public short? UpTo6KMPrice { get; set; }

        [DisplayName("Outside town km Price")]
        [Range(10, 10000)]
        public short? OutsideTownKMPrice { get; set; }

        [DisplayName("To Airport Price")]
        [Range(10, 10000)]
        public short? ToAirportPrice { get; set; }

        [Required]
        [DisplayName("No smoking")]
        public bool NoSmoking { get; set; }
        
        [Required]
        [DisplayName("Conditioning")]
        public bool Conditioning { get; set; }

        [Required]
        [DisplayName("Has Meter")]
        public bool HasMeter { get; set; }

        [Required]
        [DisplayName("Speaks english")]
        public bool SpeaksEnglish { get; set; }

        [DisplayName("Park quantity")]
        [Range(1, 10000)]
        public short? ParkQuantity { get; set; }

        [DisplayName("Serving from year")]
        [Range(1, 10000)]
        public short? ServingFromYear { get; set; }

        
        [DisplayName("District")]
        public short? DistrictId { get; set; }
        public List<SelectListItem> Districts { get; set; }

        
        [DisplayName("Cars")]
        public List<short> SelectedCarIds { get; set; }
        public List<SelectListItem> Cars { get; set; }

        [DisplayName("Notes")]
        public string InternalNotes { get; set; }
    }

    public class CarViewModel{
        public short Id { get; set; }
        public string Make { get; set; }
        public string Model { get; set; }
        public short Class { get; set; }
    }
}
